package com.dick.base.api;

import com.dick.base.service.DepartmentService;
import com.dick.base.util.BaseResult;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;

@RestController
@RequestMapping("api/admin")
public class AdminApi {

    @Autowired
    private DepartmentService departmentService;

    @PostMapping("departments/move-in")
    public BaseResult<Void> moveIn(@RequestParam Long useId, @RequestParam Integer departmentId) {
        departmentService.moveIn(useId, departmentId);
        return BaseResult.voidResult();
    }
}
